{% load staticfiles %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试前台页面使用Django-CKEditor</title>
    <link href="{% static 'blog/css/bootstrap.min.css' %}" rel="stylesheet">
    <script src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script>
    <script  src="{% static "ckeditor/ckeditor-init.js" %}"></script>

</head>
<body>
<div class="row">
    <div class="col-md-offset-2 col-md-8">
        <form novalidate action="" method="post" class="form-horizontal" enctype="multipart/form-data">
            {% csrf_token %}
            <div class="form-group">
                <label for="title" class="col-sm-2 control-label">文章标题</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="title" name="title" value="{{ blog.title }}">
                </div>
            </div>
            <div class="form-group">
                <label for="body" class="col-sm-2 control-label">文章内容</label>
                <div class="col-sm-10">
                    <textarea name="body">{{ blog.body }}</textarea>
                    <script>
                       CKEDITOR.replace( 'body',  {width: '860px',height:'600px',
                       filebrowserBrowseUrl: '/ckeditor/browse/' ,
                       filebrowserUploadUrl: '/ckeditor/upload/'});
                    </script>
                </div>
            </div>

        </form>
    </div>
</div>
</body>

<script src="{% static 'blog/js/jquery-2.1.3.min.js' %}"></script>
<script src="{% static 'blog/js/bootstrap.min.js' %}"></script>
</body>
</html>
